const {
    Mysql
} = require('../tools/utils');
module.exports = async (ctx) => {
    let sql = `SELECT video.*,recommend.* FROM video RIGHT JOIN recommend on video.vid=recommend.vid`;
    try {
        let list = await Mysql(sql);
        ctx.state.data = {
            list: list,
            // total: total[0].total,
            code: '001'
        }
    } catch (error) {
        ctx.state.data = {
            code: '002',
            err: 'مەغلۇپ بولدى'
        }
    }
}